1. Field of the Invention
Embodiments of the invention relate to image processing circuits and methods. More particularly, embodiments of the invention relate to a method of determining a coding mode adapted to increase the data compression rate for an auto exposure controlled image and a related circuit.
This application claims the benefit of Korean Patent Application No. 2005-09542 filed Feb. 2, 2005, the subject matter of which is incorporated herein by reference in its entirety.
2. Description of the Related Art
Conventional encoding methods for digital data generated by an image encoding system using correlativity between frames may be classified as intra-frame (or “intra”) mode of operation and inter-frame (or “inter”) mode of operation. Data is compressed regardless of the particular correlativity of frames in an intra mode. However, data is compressed in an inter mode by first identifying the most similar data between a body of target data and actual image data, and thereafter obtaining difference values (or “differences) between the two data bodies, and finally encoding only the differences.
FIG. 1 is a block diagram illustrating a conventional image encoder. As shown in FIG. 1, the image encoder includes a first frame memory 101, a transformer 102, a quantization unit 103, an encoding unit 104, an inverse-quantization unit 105, an inverse-transformer 106, a second frame memory 107, a motion estimator (ME) 108, a motion compensator (MC) 109 and a block mode deciding unit 110.
Input image data is stored in first frame memory 101. First frame memory 101 variously outputs pixel values from the stored image data to transformer 102 according to an encoding mode determined by block mode deciding unit 110. That is, pixel values for a current data block are received by transformer 102 where an intra mode is determined, but only the differences between the pixel values of a current data block and pixel values of a previous data block are received by transformer 102 where an inter mode is determined.
Transformer 102 performs a discrete cosine transform (DCT) on the pixel values received by transformer 102. The DCT is an algorithm transforming the frame data for the input image from a space domain into a frequency domain. The DCT thereby eliminates spatial redundancy in the image data by dumping a high frequency portion of the image data and concentrating the information content of the image data into a low frequency portion. The high frequency portion of the image data includes many pixels having a large difference value from a neighboring pixel. For example, the high frequency portion of the input image data includes portions of the image expressing fluctuating edges, such as the outline of a face or hairs streaming in the wind. The DCT eliminates the high frequency portions of the input image data in order to increase the compression rate for the data.
Quantization unit 103 quantizes the discrete-cosine transformed image data received from transformer 102. That is, quantization unit 103 divides coefficient values associated with the image data using a quantizer value in order to express the image data with more “0” values.
Encoding unit 104 compresses and encodes quantized image data with a motion vector based on a variable length coding (VLC) in order to generate an output stream. The VLC is a conventionally understood encoding scheme adapted to encode data by assigning a shorter code to data having a relatively high occurrence rate and assigning a longer code to data having a relatively low occurrence rate.
Motion estimator 108 calculates a motion vector. That is, motion estimator 108 derives a motion vector defined by the relationship between the current data block stored in first frame memory 101 and image data block most similar to the current data block contained within a search area of image data stored in second frame memory 107 and related to a previous image frame.
The quantized image data may be restored to its original image data form (i.e., “recovered”) by passing it through inverse-quantization unit 105 and inverse-transforming unit 106. The recovered image data is stored in second frame memory 107 with data outputted from motion estimator 108 and motion compensator 109. Motion estimator 108 and motion compensator 109 obtain the motion vector, and compensate the restored image data by comparing the image data of the input image with the restored image data stored in second frame memory 107.
FIG. 2 is a block diagram showing a block mode deciding unit according to a prior art. With reference to FIG. 2, how the block mode deciding unit decides an intra mode or an inter mode will be explained hereinafter.
As shown in FIG. 2, the block mode deciding unit 110 comprises a first accumulator 201, a second accumulator 202 and a first comparator 203.
When pixel data from a current frame is received by block mode deciding unit 110, first accumulator 201 calculates a variation (VAR) value related to the current data block. The VAR of the current data block is calculated by obtaining differences between each pixel value in the current frame and an average pixel value for the data block, and thereafter summing the differences. The average pixel value for a data block may be calculated by adding all of the pixel values in the data block and dividing the result by the number of pixels in the data block.
Second accumulator 202 calculates an optimized sum of absolute differences (SAD) using a motion vector defined by the relationship between current frame pixel data and previous frame pixel data. A SAD value is defined by an accumulation of absolute values related to differences between the current frame pixel data and previous frame pixel data. An optimized SAD value (Min SAD) is defined as a minimum SAD value within a plurality of SAD values obtained from the current motion estimator.
First comparator 203 compares the VAR obtained by first accumulator 201 and the Min SAD obtained by second accumulator 202 to define a first threshold value (TH1) as an output. This comparison of the VAR and Min SAD is used by the block mode deciding unit to determine block mode. For example, if the difference between the VAR and Min SAD is larger than a defined threshold value for the first threshold value (TH1), the intra mode is determined, or if the difference between the VAR and the optimized SAD is smaller than the defined threshold value for the first threshold value (TH1), the inter mode is determined.
When the image encoder compresses image data using the intra mode, all of the pixel values for the current data block are compressed. However, only the differences between the current data block and the previous data block are compressed when the image encoder compresses image data using the inter mode. Therefore, the inter mode provides a higher compression rate than the intra mode.
Generally, an imaging system having (or adapted from use with) a camera module includes an auto exposure controller adapted to control the amount of light entering the camera. The auto exposure controller shortens the exposure time for an image having a relatively large amount of the light, or lengthens the exposure time for an image having a lesser amount of the light. An image generated under auto exposure control includes all of the pixels in a current frame block having a constant offset value for an associated brightness (luminescence) element as compared with pixels in the previous frame block. The offset value generates a brightness difference between the current frame block and the previous frame block. Therefore, when the image encoder compresses an auto-exposure controlled image, an image having less movement may result in an intra mode being determined for the image as a result of the presence of the offset value. Therefore, compressed bit stream is increased, and the compression rate is generally degraded when an image subjected to auto-exposure control is compressed.